package com.xqboss.apps.vo.synthesis;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author Administrator
 */
@Data
@ApiModel("合成活动-宝盒规则视图")
public class SynthesisBoxRuleVo {

    private Long id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("合成活动id")
    private Long synthesisId;

    @ApiModelProperty("用户ids")
    private String userIds;

    @ApiModelProperty("藏品ids")
    private String nftIds;

    @ApiModelProperty("合成次数门槛")
    private Integer num;

    @ApiModelProperty("创建时间")
    private Date createTime;


    @ApiModelProperty("用户数量描述")
    private String userCountDesc;

    public String getUserCountDesc() {
        if (userIds != null && !userIds.isEmpty()) {
            return userIds.split(",").length + "";
        }
        return "不限";
    }

}
